package com.demo.swingquickticket.swing;

import com.demo.swingquickticket.service.AccountService;
import com.demo.swingquickticket.swing.view.account.AccountDialog;
import com.demo.swingquickticket.util.SpringUtils;

import javax.swing.*;

public class AppMenuBar extends JMenuBar {

    private AccountService accountService = SpringUtils.getBean("accountService");

    public AppMenuBar() {
        JMenu accountMenu = new JMenu("账号管理");
        JMenuItem account = new JMenuItem("管理账户");
        account.addActionListener(e -> AccountDialog.getInstance());
//        account.addActionListener(e -> System.out.println(accountService.getLoginPic()));
        accountMenu.add(account);
        this.add(accountMenu);
    }
}
